use web_sys::{Document, Window};

pub fn get_window() -> Window {
    web_sys::window().expect("get_window: get window error")
}
pub fn get_document() -> Document {
    get_window()
        .document()
        .expect("get_document: get document error")
}
pub fn redirect_to(url: &str) {
    let _ = get_window().location().replace(url);
}
